package com.xjtu.mybatisplus.service;

import com.xjtu.mybatisplus.common.result.PageResult;
import com.xjtu.mybatisplus.model.domain.Article;
import com.baomidou.mybatisplus.extension.service.IService;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lsong
 * @since 2023-12-27
 */
public interface ArticleService extends IService<Article> {
    List<Article> getList();


    boolean removeById(Long id);

    List<Article> listByUserId(Long userId);

    //sava
    void saveArticle(Article article);

    void audit(Long id);

    List<Article> auditList(Long userId);

    void withdraw(Long id);

    PageResult getNewestArtical(Integer page, Integer size);

    PageResult getArticalByCate(Integer page, Integer size, Integer cate);

    List<Article> getHotArtical();

    Article getPublishedArticle(Long id);

    List<Long> getAllArticleId();
}
